Fix short windows being resized
authorJustin Burkett <justin@burkett.cc>
Wed, 12 Feb 2020 02:48:57 +0000 (21:48 -0500)
committerJustin Burkett <justin@burkett.cc>
Wed, 12 Feb 2020 02:48:57 +0000 (21:48 -0500)
fit-window-to-buffer defaults to a min height of 4. For some reason, the order
in which fit-window-to-buffer is called in display-buffer-in-side-window seems
to have changed. This makes the order not matter.

which-key.el

index 312272c6b7b26cddc6953b999dfb52be06049f37..d0a28a10589f3af152fd603cac0223d47a9135aa 100644 (file)
@@ -1167,7 +1167,8 @@ is shown, or if there is no need to start the closing timer."
   "Slightly modified version of `fit-buffer-to-window'.
 Use &rest params because `fit-buffer-to-window' has a different
 call signature in different emacs versions"
-  (let ((fit-window-to-buffer-horizontally t))
+  (let ((fit-window-to-buffer-horizontally t)
+        (window-min-height 1))
     (apply #'fit-window-to-buffer window params)))
 
 (defun which-key--show-buffer-side-window (act-popup-dim)